SdLicenseRtf Example

InstallShield 2018 » InstallScript Language Reference

Project • This information applies to the following project types:

InstallScript
InstallScript MSI

/*--------------------------------------------------------------*\

*

* InstallShield Example Script

*

* Demonstrates the SdLicenseRtf function.

*

* This script calls SdLicenseRtf to display a license agreement

* and prompt the user to accept or reject that agreement.

*

* Note: The license agreement is read from an RTF file that

*       is stored at the location specified by the constant

*       LICENSE_PATH.  Before running this script, set that

*       constant so that it references an existing RTF file

*       in the Support Files/Billboards view.

*

\*--------------------------------------------------------------*/

 

#define LICENSE_PATH SUPPORTDIR ^ "License.rtf"

#define TITLE "SdLicenseRtf Example"

 

#include "Ifx.h"

 

function OnBegin()

    STRING szMsg, szQuestion;

begin

 

    // Disable the Back button in setup dialogs.

    Disable (BACKBUTTON);

    

    // Set up the variables to pass as parameters to SdLicense.

    szMsg      = "Please read the following license agreement. Use " +

                 "the scroll bar to view\nthe rest of this agreement.";

    szQuestion = "Select Yes to accept the agreement.\n" +

                 "Select No to cancel the setup.";

    

    // Display the SdLicenseRtf dialog.

    if (SdLicenseRtf (TITLE, szMsg, szQuestion, LICENSE_PATH) = YES) then

        MessageBox ("Continue with the installation.", INFORMATION);

    endif;

 

end;